package com;

import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;

/**
 * Created by 41579 on 2017/5/25.
 */
public class main {

    ///private native int readBytes(byte b[], int off, int len) throws IOException;

    public static void main(String[] args) throws Exception{
//        test test = new test();
//        test.setPath("pom.xml");
//        byte b[] = new byte[1024];
//        test.read(b);
//        System.out.println(System.getProperty("java.library.path"));
//        char[] a = {'我'};
//        CharBuffer cb = CharBuffer.allocate(a.length);
//        cb.put(a);
//        cb.flip();
//        Charset cs = Charset.forName("UTF-8");
//        ByteBuffer byteBuffer = cs.encode(cb);
//        byte[] bytes = byteBuffer.array();
//        CharBuffer cb2 = cs.decode(byteBuffer);
//        char c = cb2.get();
//        char i = (char) System.in.read();
//        System.out.println(i);
        FileInputStream fis = new FileInputStream("test.txt");
        byte[] b = new byte[8192];
        fis.read(b,0,8192);
//        fis.close();
    }

}
